import nose
from rsi_shenyi import percentile
import mock


def setUp():
    print 'function setUp'


def tearDown():
    print 'function tearDown'


def test_percentile():
    rsi = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    list = [10, 20]
    test_result1 = percentile(rsi, list)
    assert test_result1 == [1.5, 2.5]


def test_rsi_derivative():
    mock.rsi_derivative = mock.Mock(return_value=1.5)
    test_result3 = mock.rsi_derivative(('/Users/kris_shen/Desktop/Python/monthForCal.csv'))
    assert test_result3 == 1.5


result = nose.run()
print result
